<!--
 * @Author: windys
 * @Description: 
 * @Date: 2022-02-14 17:14:24
-->
<template>
  <div class="set_page">
    <van-nav-bar
      title=""
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
    <van-cell title="修改密码" inset is-link icon="eye-o" @click="router.push('/editPwd')" />
    <van-cell title="意见反馈" inset is-link icon="comment-o" @click="router.push('/feedback')" />
    <!-- <van-cell title="设置资料" is-link icon="manager-o" @click="router.push('/userData')" /> -->
    <van-cell title="退出登录" is-link icon="upgrade" @click="handleLogout" />
  </div>
</template>


<script >
import { defineComponent } from "vue";
import { useRouter } from "vue-router";
import storage from "@/utils/storage";
import { Dialog } from "vant";
export default defineComponent({
  setup() {
    const router = useRouter();
    const onClickLeft = () => {
      router.push("/my");
    };
    const handleLogout = () => {
      Dialog.confirm({
        title: "提示",
        message: "确定退出",
      })
        .then(() => {
          storage.removeStorage("token");
          storage.removeStorage("v3_userinfo_mobile");
          router.push('/login')
        })
        .catch(() => {
          // on cancel
        });
    };
    return {
      router,
      onClickLeft,
      handleLogout,
    };
  },
});
</script>



<style lang="scss" scoped>
.set_page {
}
</style>